<template>
  <cj-popup v-model="isShow" round position="bottom" :closeable="true">
    <div class="c-p c-pb60">
      <div class="c-w100 c-textAlign-c c-fs28 c-pt24 c-fc-sblack">选择退款类型</div>
      <div class="c-ph24 c-mt24">
        <div class="c-pv24 c-bd-b1" @click="clickRefundType(0)">
          <p class="c-fs24 c-fc-xblack c-pb12">仅退款</p>
          <p class="c-fs22 c-fc-gray">没收到货或与商家协商不用退货</p>
        </div>
        <div class="c-pv24" @click="clickRefundType(2)">
          <p class="c-fs24 c-fc-xblack c-pb12">退货退款</p>
          <p class="c-fs22 c-fc-gray">已收到货，需要退货给商家才能退款</p>
        </div>
      </div>
    </div>
  </cj-popup>
</template>

<script>
export default {
  components: {},

  props: {
    discountCounts: {
      type: Array,
      default: () => {
        return []
      }
    }
  },

  data() {
    return {
      customPointName: localStorage.getItem('customPointName'),
      isShow: false,
    };
  },
  computed: {
    cashBackInfo() {
      return this.discountCounts.find(item => item.discountType == 9);
    }
  },
  beforeDestroy() {
    this.isShow = false;
  },
  methods: {
    public_open() {
      this.isShow = true;
    },
    close() {
      this.isShow = false;
      this.$emit('close');
    },
    clickRefundType(type) {
      this.close();
      this.$emit('clickRefundType', type);
    },
  }
};
</script>

<style scoped>
</style>
